package bbalgae.swing.outline;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class J14_BoderLayout extends JFrame {

	public J14_BoderLayout() {
		setDefaultLookAndFeelDecorated(true);
		setTitle("Boder Layout 5개 구역에 나눠 배치");
		setLayout(new BorderLayout(40,40));
		setBounds(300,300,640,480);
		
		JButton btn1 = new JButton("버튼1");
		add(btn1,BorderLayout.NORTH);
		JButton btn2 = new JButton("버튼2");
		add(btn2,BorderLayout.WEST);

		JButton btn3 = new JButton("버튼3");
		add(btn3,BorderLayout.CENTER);

		JButton btn4 = new JButton("버튼4");
		add(btn4,BorderLayout.EAST);

		JButton btn5 = new JButton("버튼5");
		add(btn5,BorderLayout.SOUTH);

		setVisible(true);
		//BorderLayout box = new BorderLayout(getContentPane(),BorderLayout.WEST);
		
		
	}
	
	
	public static void main(String[] args){
		
		SwingUtilities.invokeLater(new Runnable() {
			
			@Override
			public void run() {
				
				new J14_BoderLayout();
				
			}
		});
		
	}
	
}
